package ar.edu.unq.leezsi.model;

public class PropertyModel<T> extends Model<T> {

	private final String property;

	public PropertyModel(Model<?> target, String property) {
		super(target);
		this.property = property;
	}

	public PropertyModel(Object target, String property) {
		super(target);
		this.property = property;
	}

	@Override
	public <R> R get(String property) {
		return super.get(this.getProperty());
	}

	public String getProperty() {
		return this.property;
	}

	@Override
	public void set(String property, Object value) {
		super.set(this.getProperty(), value);
	}

}
